/**
 * Created by ajhin on 1/28/2015.
 */
package com.societyGames.socialFeedExercises
{
import com.societyGames.codeExercise.CodeExercise;

public class SocialFeedCodeExercise extends CodeExercise
{
  public var simulation:SocialFeedSimulation;

  public override function initialize():void
  {
    simulation.initialize(this._actionQueue);
    this.addChild(simulation.render);
  }

  //ICodeExercise-->
  protected override function evaluateWithExceptionsHandled():void
  {
    //Derived class should evaluate success
    if (this.simulation.isSuccess)
    {
      reportSuccess();
    }
    else
    {
      reportFailure();
    }
  }
  //<--ICodeExercise
}
}
